import request from '@/router/axios';

export function get(url, params) {
    return request({
        url,
        method: 'get',
        params
    })
}

export function post(url, data) {
    return request({
        url,
        method: 'post',
        data
    })
}

export function postJSON(url, json) {
    json.__json = true
    return request({
        url,
        method: 'post',
        data: json,
        headers: {
            'Content-Type': 'application/json;charset=UTF-8'
        }
    })
}
